package cn.xydpeng.springframework.beans.factory;

import cn.xydpeng.springframework.beans.BeansException;
import cn.xydpeng.springframework.lang.Nullable;

import java.lang.annotation.Annotation;
import java.util.Map;

/**
 * @author xydpeng
 * @version v1.0
 * @date: 2022/10/12
 * @description: 可以枚举其所有bean实例 的BeanFactory
 */
public interface ListableBeanFactory extends BeanFactory {


    String[] getBeanNamesForType(@Nullable Class<?> type);

    String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType);

    <T> Map<String, T> getBeansOfType(@Nullable Class<T> type) throws BeansException;

    Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) throws BeansException;






}
